import request from '@/utils/request'

export function getJobPage(data) {
  return request({
    url: '/jobTicket/page',
    method: 'post',
    data
  })
}


export function getJobDetail(data) {
  return request({
    url: '/jobTicket/getBySurvey',
    method: 'post',
    data
  })
}

export function submitJob(data) {
  return request({
    url: '/jobTicket/submit',
    method: 'post',
    data
  })
}

export function auditJob(data) {
  return request({
    url: '/jobTicket/audit',
    method: 'post',
    data
  })
}

export function saveAttachments(data) {
  return request({
    url: '/jobTicket/attachments',
    method: 'post',
    data
  })
}


export function jobCheckItems(data) {
  return request({
    url: '/jobTicket/checkItems',
    method: 'post',
    data
  })
}

export function exportJobTicket(data) {
  return request({
    url: '/jobTicket/template',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

//创建房间
export function createRoom(data) {
  return request({
    url: '/jobTicket/createRoom',
    method: 'post',
    data
  })
}

//关闭房间
export function deleteRoom(data) {
  return request({
    url: '/jobTicket/deleteRoom',
    method: 'post',
    headers: {
      'Content-Type': 'application/json; charset=utf-8'
    },
    data
  })
}